import { Component, EventEmitter, Injector, OnInit, Output, ViewChild } from '@angular/core';
import { AppModalComponentBase } from '@shared/common/app-modal-component-base';
import { Content2ServiceProxy } from '@shared/service-proxies/service-proxies';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { ISelectInfoItemOption } from './select-info-item-option';
import { ISelectedMenuList } from './selected-menu-list';


@Component({
    templateUrl: './sharing-info-modal.component.html'
})
export class SharingInfoModalComponent  extends AppModalComponentBase  implements OnInit{
  title?: string;
  closeBtnName?: string;
  list: any[] = [];
  isLoading = false;
  saving = false;
  option: ISelectInfoItemOption;

  callBack: {(data: ISelectedMenuList):void};

  constructor(
    public bsModalRef: BsModalRef,
    injector: Injector,
    private _contentService: Content2ServiceProxy) {
    super(injector);
  }

  ngOnInit() {
    this.list.push('PROFIT!!!');
  }

  shown(){
      this.list = [
        'Open a modal with component',
        'Pass your data',
        'Do something else',
        '...'
    ];
  }

  save(){
      //this.callBack(111);
  }

  close(): void {
    this.bsModalRef.hide();
  }
}
